/*@ File Name : sprite.h
  @ Date : 18/11/2011
  @ Author : Guillaume Collombet, Ulysse Mensa, Sylvain Chambe

Fireworks simulation projet
Copyright (C) 2011 Guillaume Collombet, Ulysse Mensa, Sylvain Chambe

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

You can contact us by sending mail at fireworks-simulation-project@googlecode.com*/

#if !defined(_SPRITE_H)
#define _SPRITE_H

#include "opengl.h"
#include "vector3.h"
#include "color.h"
#include "camera.h"
#include "texture.h"

#define SPRITE_FLARE_FILENAME "flares.png"
#define SPRITE_SMOKE_FILENAME "smoke.jpg"

struct s_Sprite {
	unsigned int textureId;
	float x;
	float y;
	float width;
	float height;
	Vector3f position;
	Color color;
	float theta;
	float phi;
} typedef Sprite;

void Sprite_Init (Sprite* sprite, const char filename[], const Vector3f* position,const Color* color, float theta,float phi);
void Sprite_InitBillboard (Sprite* sprite, const char filename[], const Vector3f* position, const Color* color, const Camera* camera);
void Sprite_InitFromTextureId (Sprite* sprite, unsigned int textureId, const Vector3f* position, const Color* color, float theta, float phi);
void Sprite_InitBillboardFromTextureId (Sprite* sprite, unsigned int textureId, const Vector3f* position, const Color* color, const Camera* camera);
void Sprite_InitWithTextureCoord (Sprite* sprite, unsigned int textureId, float x,float y,float width,float height,const Vector3f* position, const Color* color,float theta,float phi);
void Sprite_Draw(Sprite* sprite, const Camera* camera, const float taille);
void Sprite_Destroy(Sprite* sprite);

#endif  /*_SPRITE_H*/